import {
  createRouter,
  createWebHistory,
  createWebHashHistory
} from "vue-router"

const routes = [
  {
    path: "/",
    name: "Home",
    component: import("@/views/Home.vue"),
    children: [
      // 现有学校
      {
        path: "Guihuajianshe/Existing_schools",
        name: "Guihuajianshe/Existing_schools",
        component: import("@/views/Guihuajianshe/Existing_schools.vue")
      },
      // 在建学校
      {
        path: "Guihuajianshe/School_construction",
        name: "Guihuajianshe/School_construction",
        component: import("@/views/Guihuajianshe/School_construction.vue")
      },
      // 规划学校
      {
        path: "Guihuajianshe/Planning_schools",
        name: "Guihuajianshe/Planning_schools",
        component: import("@/views/Guihuajianshe/Planning_schools.vue")
      }
    ]
  }
]
const router = createRouter({
  // hash 模式: createWebHashHistory
  // history 模式 : createWebHistory
  // history: createWebHistory(),
  history: createWebHashHistory(),
  routes
})

export default router
